1. Field of the Invention
This invention relates to techniques for enabling a computer program to be platform independent, and more specifically, to the use of global objects for mapping registry functionality amongst the different operating systems.
2. Background and Related Art
An installer program is a software program that enables a programmer to write specific code that will allow a user to install a given application program onto the drives of a computer in a way that enables the given application program to work correctly with the computer""s environment including its operating system. There are several types of installersxe2x80x94Java installers and operating system specific installers, e.g., Windows installers, OS/2 installers and AIX installers, etc. Many of these install programs existing today have various limitations in their functionality as discussed below.
One type of Java installer is provided by a software company known as InstallShield. Currently, this Java installer has some limitations on certain functional features. For example, the Java installer provides default panels, but the text can""t be changed or configured. Also, this Java installer is not easy to customize. In other words, a programmer cannot easily add a function to the installer program that it doesn""t already do. In addition, the Java installer does not provide very much registry support. A registry is a central repository for all possible information for the computer such as hardware configurations and software settings, etc. The registry enables a user/programmer to keep information about the software product. It enables a user to find out information about other products, based upon what the user/programmer put into the registry or what the user is looking for. Presently, the Java installer only works with a Windows"" registry; and the support provided here is limited. For example, it does not enable the system Windows"" registry to be updated directly. Instead, the keys to be updated are in a file which must be imported into the registry through a system call. It would be desirable if such a Java installer program supported multiple directories, splash screens (which are images that come up while a software product is being installed), and multiple languages instead of just English. Furthermore, it would be desirable for a given installer program to be more broadly applicable to other environments and operating systems. Although InstallShields"" Java installer is tailored to Java, it is also geared somewhat for the Windows"" operating system as discussed above in terms of the Windows"" registry support provided. However, it does not provide specific support for other operating systems such as OS/2 or AIX.
Another Java installer is called xe2x80x9cInstall Anywherexe2x80x9d from ZeroG. This Java installer program also has a default panel that cannot be changed, i.e., it is not customizable in terms of the order in which the panels are to appear. Likewise, registry support is limited. A user/programmer updates a registry from a file using a xe2x80x9creg_editxe2x80x9d command. Although this installer program enables a user/programmer to add a few items into the registry, the registry cannot be queried. In addition, other registry functional features are not available. Likewise, there is no multiple directory support, and no national language support. Also, it does not support multiple operating systems, i.e., there is no OS/2 or AIX specific support.
Another approach would be to provide install APIs for Java. However, this approach is not yet available.
With respect to operating system specific installers, InstallShield provides a Windows"" 32 installer. Although this installer program is widely used throughout the industry, it is based upon a proprietary scripting language that InstallShield defined. The scripting language is similar to Basic programming language. Nevertheless, a user/programmer must learn the scripting language to be able to write an install program, and it is not a real easy language to write in. When creating install programs using the Windows"" 32 installer, a programmer must first learn the new language. Even then, it is difficult to write complicated install scripts with this scripting language.
For the OS/2 operating system, there is not a true architected way within the operating system itself to install. Two programs have existed for writing install code on OS/2. One of them is xe2x80x9cFeature Installerxe2x80x9d, which has a tendency to be difficult to use. Also, it is hard to figure out how to write an install program from it. For example, it is tied into the workplace shell which requires special knowledge of SOM programming. Also, there is no compression of files. The second program is xe2x80x9cSoftware Installerxe2x80x9d, which was the precursor to xe2x80x9cFeature Installerxe2x80x9d, and is no longer supported as a product.
Also, for the OS/2 operating system, since OS/2 has Java on it, a programmer could use InstallShields"" Java edition to write install code to install some types of programs. However, this does not provide much function other than just copying files.
Other than using Feature Installer, Software Installer, or a Java Installer, programmers must come up with their own way to write install code for an application program on an OS/2 machine.
Since the OS/2 operating system appears to have been architected without regard to install features, the above discussed ways for installing OS/2 application programs have no way to talk to each other. They will each have a different way of keeping track of things. As such, there is no one place to go to find out what has been installed on an OS/2 machine or to check dependencies to see what has been installed already.
For the AIX operating system, the command xe2x80x9cinstallpxe2x80x9d is used to install products. It is platform specific. It is also command line driven which is typical for the AIX operating system Nevertheless, it appears to work well and is widely used.
As shown above, installers are tailored for a specific operating environment, e.g., JAVA, and/or operating system. As such, programmers using an installer to write install code must know and understand the specific operating environment and/or system quite well. This creates an added burden for a software company that produces many different application programs, with each application program available on many different operating systems. Separate install code must be written for each application for each different operating system. This requires a matrix of expertisexe2x80x94expertise in a given application, and expertise in a given operating system environment. This requires either a widely knowledgeable expert who is burdened with writing various specific versions of install code, or many different expert programmers who are essentially assigned the same task of writing install code.
Without such expertise, small software products just do not get install programs written for them for various platforms. In addition, money, resources, and time could be saved by writing an installer program only once that is applicable across all operating systems and environments.
It would also be desirable for a software manufacturer to have a common look and feel for writing install code for all of its products. In this way, as a programmer moved from platform to platform in writing install code, the programmer would recognize the interface, and know how it works. Thereby making the programmers task much easier.
Also, as shown above, there presently does not exist a functionally rich installer for Java. It is desirable to have a Java installer that is at least as functionally rich as a Window""s installer.
It is therefore an object of this invention to provide a cross-platform installer that can be used to install products across multiple operating systems.
It is a further object of this invention to provide a tool kit that will enable a programmer knowledgeable in writing install programs to be able to automatically write an install program that is applicable across other operating systems and environments without having to be an expert in each of the operating systems and environments.
It is a further object of this invention to provide a common look and feel for writing install code for all products.
It is a further object of this invention to provide a full function installer.
The installer tool kit of the preferred embodiment of this invention supports the Windows 32 operating systems including Windows 95, Windows 98 and NT 4.0. It also supports OS/2 Warp 4.0, OS390, AIX 4.1 and higher versions, Solaris and Linux 4.2. Although the structure of the preferred embodiment enables support for any given operating system or environment, future embodiments or further enhancements to the present preferred embodiment will enable full support for other operating systems such as NT 5.0, HP-UX, and AS/400.
In the preferred embodiment of this invention, the functions provided by the installer tool kit are script based (Java). This enables the developer who is writing an installer to do whatever the developer wants to do. The developer is not limited in having panels occur in a particular order, or in not being able to make the calls that need to be made, or in not being able to perform a desired function such as configuring files, etc. To accomplish this, the tool kit was written using Java, although any script-based language would provide this same flexibility. As such, anything that Java has available in it is available to the developer. Furthermore, the tool kit enables a developer to perform functions on files and directories, e.g., to copy, read, create, modify, version and to batch files. With respect to registry functions, the tool kit enables a developer to write an install program that can read, create, modify, delete, and enumerate registries for the Windows operating system which is the only operating system that has a registry. These same functions are provided for all other operating systems that do not have a registry, but do have registry equivalent functionality.
Other functions of the tool kit include i) providing install property objects that contain variables as values that become defined for a specific operating environment; ii) enabling a property value to be temporarily overridden; iii) a software state machine that enables a programmer to easily customize an install program by merely adding, deleting, or changing the various states that contain the functions and flow of control of the program; iv) automatically detecting a programming error if a programmer incorrectly specifies a non-existent state within the state machine; v) automatically selecting a system-dependent function; vi) a containment structure consisting of program object/fileset objects/install objects where each fileset object and install object contains means to install and uninstall itself and to log itself; vii) enabling the management of folders, shortcuts and icons, viii) enabling environment variables to be read, created, modified and deleted, ix) providing dependency checking of prerequisite programs during both install and uninstall, and x) providing various logs, e.g., a log for keeping track of what is being installed, and a log that reports the progress of install. Logs are used for both the install and uninstall process. Furthermore, these logs are human readable which allows them to be checked, e.g., after a silent install, to ensure that a file has installed successfully. The tool kit also enables multiple destination directories to be installed from multiple source directories. For example, there can be multiple components of file sets included in an install where a file set is a separately installable/uninstallable piece of code or set of files.
The tool kit also enables an install program to undo an install. What has been changed during an install is kept track of. If, for example, an install is over the top of a previous install, the changes are saved in a file and restored if the latest install is then uninstalled. In other words, a previous version is recovered when a latest version is uninstalled by replacing a backup of files.
Other features include a) a progress bar that shows the status during an install, b) splash screens which can be displayed during an install, c) national language support, d) the ability to perform unattended install from install scripts, and e) an install wizard. There are also twenty or so defining default panels that are available. It is also easy for a programmer to add a programmer""s own panels without a lot of effort.
The system, method, and program of this invention enables a developer to write a platform independent program that can read, create, modify, delete, and enumerate registry type of information regardless of whether or not a targeted operating system supports a registry or registry equivalent functionality. More specifically, as disclosed herein, there is a global registry object for carrying out, i.e., mapping, registry functions or registry equivalent functions across multiple operating systems. In particular, the global registry object is used to map registry equivalent functions in an OS/2 operating system environment. A given INI file is specified through a filename field of the global registry object to resemble a registry file. A key and a subkey representative of a Windows registry are stored in an application name of the specified INI file. A value representative of the Windows registry is stored in a key of the specified INI file. Platform specific code specific to the OS/2 operating system contains methods for retrieving the application name and the key from the INI file for use by the global registry object.
In other preferred embodiments, the global registry object is used to manipulate registry functions in a Windows operating system environment, and to map registry equivalent functions in an AIX operating system environment In another preferred embodiment, a system independent registry is created for those systems that do not have a registry equivalent.
Preferred embodiments of the invention include a) an installer tool kit, including a system, method, and program, that enables the creation of install programs for any one of a plurality of operating systems as described herein, b) an install program that can be used for multiple platforms to install an application program on a specific operating system; i.e., the same install program can be used to install a similar application program on different operating systems, c) a method for carrying out the functions of the install program, and d) a computer system running the install program on a specific operating system for installing an application program. Other more general embodiments include a) any tool kit for enabling the creation of programs that are capable of running on more than one operating system, b) any program that is enabled for multiple platforms, c) methods carried out by cross platform programs, and d) a computer system running a program that is enabled for multiple platforms.